/*
https://www.luogu.org/problemnew/show/1002
*/ 
#include <stdio.h>
#include <string.h>

#define MAX  (40)

int map[MAX][MAX];

static int m = 0;
static int n = 0;
static int horseM = 0;
static int horseN = 0;

int getPNum(int x, int y)
{
	if ( x == 0 && y == 0) {
		return 1;
	}
	if ( x == 0 && y == 1 ) {
		return 1;
	}
	if ( x == 1 && y == 0 ) {
		return 1;
	}
	if ( x == horseM && y == horseN ) {
		return 0;
	}
	if ( x == horseM-1 && y == horseN ) {
		return 0;
	}
	if ( x == horseM+1 && y == horseN ) {
		return 0;
	}
	if ( x == horseM && y == horseN + 1 ) {
		return 0;
	}
	if ( x == horseM && y == horseN - 1 ) {
		return 0;
	}
	if ( x == horseM - 1 && y == horseN - 1 ) {
		return 0;
	}
	if ( x == horseM + 1 && y == horseN + 1 ) {
		return 0;
	}
	if ( x < 0 || y < 0 ) {
		return 0;
	}
	return getPNum( x - 1, y) + getPNum( x, y-1);  
}


// p[i, j] = p[i+1, j] + p[i, j+1]
int main()
{
	memset(map, 0, sizeof(map));
	scanf("%d %d %d %d", &m, &n, &horseM, &horseN);
	int num = getPNum(m, n);
	printf("%d", num); 
	return 0;
}
